var rootview = ui("$");
var do_App = sm("do_App");
var do_Page = sm("do_Page");
var nf = sm("do_Notification");
var http = require("helper/http");
// 创建一个External对象
var external = sm("do_External");
var helperOpen = require("helper/open");
// ui
var aLayoutOpenDial = ui("aLayoutOpenDial");
var buttonOrder=ui("buttonOrder");
var labelPayType=ui("labelPayType");
var helperOpen = require("helper/open");
rootview.setMapping({ // 此处的Mapping只能设置在 RootView 上 ;
	"aLayoutOpenDial.tag" : "userPhone",
	"imageViewSignLogo.source" : "userLogo",
	"labelSignNick.text" : "userNick",
	"labelTime.text" : "dayMinutesNewAt",
	"labelPayType.text" : "showPayStatus",
	"buttonOrder.tag":"orderNo",
	"aLayoutSignLogo.tag":"userId",
	"labelPayType.tag":"deliveryStatus"
});

rootview.on("dataRefreshed", function() {
	/*if(buttonOrder.tag){
		buttonOrder.visible=true;
	}else{
		buttonOrder.visible=false;
	}
	if(labelPayType.text=="已付款"){
		if(labelPayType.tag==1){
			labelPayType.text="未确认收款";
		}else if(labelPayType.tag==2){
			labelPayType.text="已确认收款";
		}
	}
	if(null!=aLayoutOpenDial.tag&&''!=aLayoutOpenDial.tag){
		aLayoutOpenDial.visible=true;
	}else{
		aLayoutOpenDial.visible=false;
	}*/
});
buttonOrder.on("touch",function(){//去订单
	helperOpen.open("source://view/order/seller/detail.ui", {orderNo : buttonOrder.tag});
})

aLayoutOpenDial.on("touch", function() {

	external.openDial(this.tag);

})

ui("aLayoutSignLogo").on("touch","",300,function(){
	helperOpen.openPersonal(this.tag);
})
